// 获取url链接内字段
export const getUrlCode = () => {
  // 截取url中的code方法
  const url = location.search;
  const winUrl = url;
  const theRequest: any = new Object();
  if (url.indexOf("?") != -1) {
    const str = url.substr(1);
    const strs = str.split("&");
    for (let i = 0; i < strs.length; i++) {
      theRequest[strs[i].split("=")[0]] = strs[i].split("=")[1];
    }
  }
  return theRequest;
}